
/**
 * 外观设计模式
 * @author：涂有
 * @date 2017年7月3日 上午9:43:40
 */
public class Computer {
	
	private CPU cpu;
	private Memory memory;
	private Disk disk;
	
	public Computer(){
		cpu = new CPU();
		memory = new Memory();
		disk = new Disk();
	}
	
	public void startup(){
		System.out.println("computer startup");
		cpu.startup();
		memory.startup();
		disk.startup();
	}
	
	public void shutdown(){
		System.out.println("computer shutdown");
		cpu.shutdown();
		memory.shutdown();
		disk.shutdown();
	}
}
